﻿
@{
    ViewData["Title"] = "用户审核";
}

@section Scripts
    {
    <script type="text/javascript">
        var selfLayer = null, page = 1, active = null;
        layui.use(['layer', 'table', 'laydate', 'form'], function () {
            var form = layui.form;

            var item = '@ViewData["Id"]';
            console.log(item);

               form.on('submit(submit)', function (data) {
                var IsAttest = $("#IsAttest option:selected").val();

                   //console.log(IsAttest);
                   //console.log(data.field.Remarks);

                 axios.get('/UserAttest/UserIsAttest', {
                    params: {
                         userAttestId: '@ViewData["Id"]',
                         Remarks: data.field.Remarks,
                         isAttest: IsAttest,
                     }
                }).then(function (response) {
                    console.log(response);
                    if (response.data.Code == 200) {
                         javascript: history.go(-1);
                    } else {
                        alert(response.msg)
                    }
                }).catch(function (error) {
                    console.log(error);
                });
            });
        });
    </script>
}

<form class="layui-form layui-form-pane">
    <div class="layui-form-item">
        <label class="layui-form-label">类型</label>
        <div class="layui-input-inline">
            <select lay-search="" id="IsAttest" name="IsAttest" autocomplete="off" lay-verify="required">
                <option value="0">通过</option>
                <option value="1">否决</option>
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-block">
            <textarea id="Remarks" name="Remarks" style="width:545px;height:100px"></textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <input class="layui-btn" type="button" style="width: 100px" lay-submit lay-filter="submit" value="立即提交" />
            <button type="reset" style="width: 100px" class="layui-btn layui-btn-primary">重置</button>
            <a style="width: 100px" class="layui-btn layui-btn-primary backIframe" asp-action="Index">返回</a>
        </div>
    </div>
</form>
